/**
* Appcelerator Titanium Platform
* Copyright (c) 2009-2011 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
**/
// Code is stripped-down version of Tweetanium, to expose new structure paradigm

(function() {	
	//Globally available theme object to hold theme colors/constants
	S.ui.theme = {
		textColor:'red',
		grayTextColor:'#888888',
		headerColor:'#333333',
		lightBlue:'#006cb1',
		darkBlue:'#93caed',
		fontFamily: S.os({
			iphone:'Helvetica Neue',
			android:'Lacu_r'
		}),
		aboutHeaderTextColor:'#637b92',
		aboutTextColor:'#464849'
	};

	//Different tab layout for various screen sizes
	if (Ti.Platform.displayCaps.platformWidth >= 480) {
		S.ui.layout = {
			tabCount: 5,
			tabHeight: 100,
			tableRowHeight: 90
		};
	} else {
		S.ui.layout = {
			tabCount: 3,
			tabHeight: 60,
			tableRowHeight: 90
		};
	};
	
	//All shared property sets are declared here.
	S.ui.properties = {
		//grab platform dimensions only once to save a trip over the bridge
		platformWidth: Ti.Platform.displayCaps.platformWidth,
		platformHeight: Ti.Platform.displayCaps.platformHeight,
		animationDuration: 0,
		animationDurationTabs: 75,
		//we use these for default components
		Window: {
			orientationModes:[Ti.UI.PORTRAIT],
    		fullscreen:true,  
    		navBarHidden:true,
    		exitOnClose:true  			
		},
		Button: {
			height:50,
			width:250,
			color:'#000',
			font: {
				fontSize:18,
				fontWeight:'bold'
			}
		},
		Label: {
			color:S.ui.theme.textColor,
			font: {
				fontFamily:'Lacu_r',
				fontSize:15
			},
			textAlign: "center",
			backgroundColor:'blue'
		},
		TextField: {
			height:55,
			borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
			color:'#000000',
			clearButtonMode: Titanium.UI.INPUT_BUTTONMODE_ALWAYS
		},
		headerView: {
			top:0,
			backgroundColor:'blue',
			height:100,
			//backgroundImage:'header_bg.png',
			zIndex:0
		},
		mainFilmStrip: {
			top:100,
			left:0,
			bottom:S.ui.layout.tabHeight,
			backgroundColor:'#FF00FF'			
		},
		contentView: {
			backgroundColor:'green',
			width: Ti.Platform.displayCaps.platformWidth,
			//backgroundImage:'KS_nav_ui.png',
			zIndex:1,
			font: {
				fontFamily: S.os({
					iphone:'Helvetica Neue',
					android:'Lacu_r'
				})
			}			
		},
		tabView: {
			//contentWidth:1500,
			contentHeight:S.ui.layout.tabHeight,
			bottom:0,
			height:S.ui.layout.tabHeight,
			backgroundColor:'#13386c',
			zIndex:2
		},
		tabItem: {
			left:0,
			top:0,
			height:S.ui.layout.tabHeight,
			width:Ti.Platform.displayCaps.platformWidth/S.ui.layout.tabCount,
			bottom:0
		},
		tableRow: {
			//height:S.ui.layout.tableRowHeight,
			borderColor:'#13386c',
			layout:'vertical',
			width:Ti.Platform.displayCaps.platformWidth
			
		},
		aboutHeaderLabel: {
			color:S.ui.theme.aboutHeaderTextColor,
			font: {
				fontFamily:'Lacu_i',
				fontSize:20
			},
			textAlign: "center"
		},
		aboutContentLabel: {
			color:S.ui.theme.aboutTextColor,
			font: {
				fontFamily:'Lacu_r',
				fontSize:18
			},
			width:'86%'
		},
		listImgThumbnail: {
			//height: S.ui.layout.tableRowHeight
			height:75,
			width:75
		},
		listTitleLabel: {
			font: {
				fontFamily:'Lacu_r',
				fontSize:25
			},
			backgroundColor:'red'
		},
		listDescriptionLabel: {
			font: {
				fontFamily:'Lacu_r',
				fontSize:18
			},
			backgroundColor:'blue'
		}		

		
	};
	
	S.ui.candidate = {
		
		aboutImageContainer: {
			
		},
		aboutTextContainer: {
			padding:50,
			center:'50%'
		}
		
	};

})();


//global shortcut for UI properties, since these get used A LOT. polluting the global
//namespace, but for a good cause (saving keystrokes)
var $$ = S.ui.properties;
var $$$ = S.ui.candidate;

